/**
 * 
 */
package com.youth.fund.hk.hostManager.manager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.youth.fund.hk.hostManager.common.dao.ICommonDao;
import com.youth.fund.hk.hostManager.common.service.impl.CommonService;
import com.youth.fund.hk.hostManager.manager.dao.ProductDao;
import com.youth.fund.hk.hostManager.manager.datamodel.ProductModel;
import com.youth.fund.hk.hostManager.manager.service.InitService;
import com.youth.fund.hk.hostManager.manager.service.ProductService;

/**
 * @author Sunk_Sky
 *
 * 2014年11月12日下午8:55:23
 */
@Service("ProductService")
public class ProductServiceImpl extends CommonService<ProductModel> implements
		ProductService
{
	@Autowired
	@Qualifier("InitService")
	private InitService initService;
	
	private ProductDao dao;
	/* (non-Javadoc)
	 * @see com.youth.fund.hk.hostManager.common.service.impl.CommonService#setCommonDao(com.youth.fund.hk.hostManager.common.dao.ICommonDao)
	 */
	@Autowired
	@Qualifier("ProductDao")
	@Override
	public void setCommonDao(ICommonDao<ProductModel> commonDao)
	{
		this.commonDao = commonDao;
		
		this.dao = (ProductDao) commonDao;
		
	}
	/* (non-Javadoc)
	 * @see com.youth.fund.hk.hostManager.common.service.impl.CommonService#generateHtml(java.io.Serializable)
	 */
	@Override
	public void generateHtml(ProductModel model)
	{
		
		
	}
	/* (non-Javadoc)
	 * @see com.youth.fund.hk.hostManager.manager.service.ProductService#getProductListByType(int)
	 */
	@Override
	public List<ProductModel> getProductListByType(int type_id)
	{
		List<ProductModel> result = null;
		
		ProductModel condition = new ProductModel();
		
		condition.setType_id(type_id);
		
		result = dao.query(condition);
		
		return result;
	}

	

}
